package com.hdoit.ares.logical.cust.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.hdoit.ares.logical.cust.dao.ICustCollectionDao;
import com.hdoit.ares.logical.cust.model.CustCollection;
import com.hdoit.ares.logical.cust.service.ICustCollectionService;
import com.hdoit.ares.logical.official.model.Artical;
import com.hdoit.ares.logical.viewmodel.cust.MyCollection;
import com.tennetcn.common.dao.base.impl.SuperService;
/**
 * @author      xieqixiu
 * @email       
 * @createtime  2017年11月25日 15:10:53
 * @comment
 */
@Component
public class CustCollectionServiceImpl extends SuperService<CustCollection> implements ICustCollectionService{

	private ICustCollectionDao custCollectionDao;
	
	public ICustCollectionDao getCustCollectionDao() {
		return custCollectionDao;
	}

	@Resource
	public void setCustCollectionDao(ICustCollectionDao custCollectionDao) {
		this.custCollectionDao = custCollectionDao;
	}

	@Override
	public int deleteCollection(String type, String thingId, String custId) {
		
		return custCollectionDao.deleteCollection(type, thingId, custId);
	}

	@Override
	public List<MyCollection> selectCollectionByType(String type, String custId) {
		return custCollectionDao.selectCollectionByType(type, custId);
	}

	@Override
	public List<Artical> selectArticalByType(String type, String custId,Integer pageNum,Integer length) {
		return custCollectionDao.selectArticalByType(type, custId, pageNum, length);
	}

	@Override
	public CustCollection selectCustCollection(String thingId, String custId) {
		
		return custCollectionDao.selectCustCollection(thingId, custId);
	}

	@Override
	public List<Artical> selectAllArtical(String custId,Integer pageNum,Integer length) {

		return custCollectionDao.selectAllArtical(custId,pageNum,length);
	}
	
}